package d3_charset;

import java.io.*;

public class t5iothrow {
    public static void main(String[] args) {
        InputStream isr = null;
        OutputStream osw = null;
        try {
            isr = new FileInputStream("D:\\wuyong\\AA1BAd5P.jfif");
            osw = new FileOutputStream("D:\\wuyong\\bbb\\AA1BAd5P.jfif");
            //2.创建字节数组
            byte[] buffer = new byte[1024];
            int len;
            while ((len = isr.read(buffer)) > 0) {
                osw.write(buffer, 0, len);
            }


            System.out.println("finish");
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (osw != null) {
                    osw.close();
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            try {
                if (isr != null) {
                    isr.close();
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
